﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            String type=Request.QueryString["type"];

            if (type == "reg")
            {
                mv.SetActiveView(View2);
            }
            else
            {
                mv.SetActiveView(View1);
            }
        }
    }
    protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
    {
        String username = CreateUserWizard1.UserName;
        String mail = CreateUserWizard1.Email;

        if (!MovieAccess.AddUser(username, mail)) Response.Redirect("Ooops.aspx");
    }
}